package com.zhangtai.modules.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhangtai.modules.entity.employee.EmployerCompanyEntity;
import com.zhangtai.modules.entity.system.ContractSubGroupEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-07-27 16:46:00
 */
@Mapper
public interface EmployerCompanyDao extends BaseMapper<EmployerCompanyEntity> {

    @Select("<script>SELECT " +
            "t1.*" +
            "FROM " +
            " tb_employer_company t1 " +
            "<where> t1.is_delete = 0   " +
            "AND t1.id IN"+
            "<foreach collection=\"contractIds\" item=\"item\" index=\"index\" "+
            "open=\"(\" separator=\",\" close=\")\">"+
            "#{item}"+
            "</foreach>"+
            "</where>" +
            "</script>")
    List<EmployerCompanyEntity> getContractMainIds(@Param(value = "contractIds") List<Long> contractIds);

}
